"use strict";
exports.__esModule = true;
var vue_1 = require("vue");
var vue_router_1 = require("vue-router");
var Home_vue_1 = require("@/pages/home/Home.vue");
var City_vue_1 = require("@/pages/city/City.vue");
var Detail_vue_1 = require("@/pages/detail/Detail.vue");
vue_1["default"].use(vue_router_1["default"]);
var routes = [
    {
        path: '/',
        name: 'Home',
        component: Home_vue_1["default"]
    },
    {
        path: '/city',
        name: 'City',
        component: City_vue_1["default"]
    },
    {
        path: '/detail/:id',
        name: 'Detail',
        component: Detail_vue_1["default"]
    }
];
var router = new vue_router_1["default"]({
    mode: 'history',
    routes: routes,
    // 清除页面滚动距离缓存，使其不影响其他页面
    scrollBehavior: function (to, from, savedPosition) {
        return { x: 0, y: 0 };
    }
});
exports["default"] = router;
